package edu.cdtu.db;

import java.io.Serializable;

public class OracleDB implements DBInterface {
    private OracleDBConnection connection;
    @Override
    public int insert(Object entity) {
        String sql = "INSERT INTO table_name (column1, column2, column3,...)\n" +
                "VALUES (value1, value2, value3,...);";
        connection.execute(sql);
        return 0;
    }

    @Override
    public int updateById(Object entity) {
        String sql = "UPDATE table_name SET column1 = value1, column2 = value2...., columnN = valueN WHERE [condition];";
        connection.execute(sql);
        return 0;
    }

    @Override
    public int deleteById(Serializable id) {
        String sql = "DELETE FROM table_name WHERE [condition];";
        connection.execute(sql);
        return 0;
    }

    @Override
    public Object selectById(Serializable id) {
        String sql = "SELECT column1, column2,...columnN FROM table_name;column1, column2,...columnN ";
        connection.execute(sql);
        return null;
    }
}
